<template>
    <div class="main" v-title data-title="保密确认书">
        <h1>欢迎进入海芯科技平台</h1>
        <div class="navCenter">
          <div class="contentBox">            
            <div class="contentCenter">保密确认书
              <div class="contentLast">{{confidentialityNo}}</div>
            </div>
            <div class="contentTip">
              <div class="contentFont">1、本人在海芯平台的个人账号由本人保管，禁止把个人账号转给其他人员使用。在平台上的所有操作均为本人自愿操作，本人愿意承担该操作行为产生的一切法律效果。</div>
              <div class="contentFont">2、海芯平台的所有信息，不论来源、方式和储存介质，都属于公司保密信息，仅限在公司范围内的工作电脑使用，<label style="color: #e74040; font-weight: bolder;">未经授权，不得以复制、截屏、照相等任何形式，</label>发送给业务无关的人员或者公司外的人员。本人将严格按照公司保密管理制度执行。</div>
              <div class="contentFont">3、按规范操作海芯平台，因个人操作失误，影响上下游业务、产生数据错误或者造成公司损失的，按相关规定处理。</div>
              <div class="contentFont">4、海芯平台记录所有的操作、查询记录，本人将按工作实际需要进行操作。</div>
            </div>
            <div class="contentCenter contentFont" style="padding-top: 20px;">
              <a-checkbox :checked="defaultCheck" @click="switchChecked">
                我已认真阅读并同意签收保密确认书
              </a-checkbox>
            </div>
            <div class="footer">
              <a-button type="primary" @click="confirmConfidentiality">
                进入平台
              </a-button>
            </div>
          </div>          
        </div>
    </div>
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types"
import { codeInfoList } from "@/api/codeInfo"
import {getAction} from '@/api/manage'
export default {
    data () {
        return {
          confidentialityNo:this.$route.query.confidentialityNo,
          backUrl:this.$route.query.backUrl,
          detailId:this.$route.query.detailId,
          userinfo:{
            info:this.$store.getters.userInfo,
            module:'home',
            badgecount:''
          },
          defaultCheck:true

        }
    },
    created(){
    },
    mounted () {
    },
    methods: {
      switchChecked(){
        this.defaultCheck=!this.defaultCheck;
      },
      confirmConfidentiality(){
        if(!this.defaultCheck){
          this.$message.warning('请先勾选“我已认真阅读并同意签收保密确认书”');
          return;
        }
        getAction("/confidentialityConfirm/confirm",{confidentialityNo:this.confidentialityNo}).then(res=>{
          if(res.success){
            if(this.backUrl!==''&&this.backUrl!==undefined){
              if (this.backUrl.indexOf('dailyTaskDetail') != -1 || this.backUrl.indexOf('projectTaskDetail') != -1) {
                this.backUrl = this.backUrl + '&detailId='+this.detailId
              }
              this.$router.push({ path: this.backUrl }).catch(()=>{
                console.log('登录跳转首页出错,这个错误从哪里来的')
              });
            }else{
              this.$router.push({ path: "/homepage" }).catch(()=>{
                console.log('登录跳转首页出错,这个错误从哪里来的')
              });
            }
          }else{
            this.$message.warning('确认保密确认书异常：'+res.message);
          }
        }).catch(res=>{
          this.$message.warning('确认保密确认书异常：'+res.message);
        });
      }
    }
}
</script>
<style lang="less" scoped>
h1{
  font-weight: Bold;
  font-size: 52px;
  color: #FFFFFF;
  letter-spacing: 0;
  padding-top: 97px;
  margin-bottom: 40px;
  text-align: center;
}
.main{
    position: relative;
    width: 100%;
    height: 100%;
    background: url('../assets/confidentiality/confirmHeader202206.png') no-repeat;
    background-attachment: fixed;
    background-position: center;
    position: absolute;
    height: 100%;
    width: 100%;
    background-size: cover;       
    ul{
        list-style: none;
    }    
    .navCenter{
      text-align: center;
    }
}
.contentFont {
  line-height: 25px;
  padding: 4px 0;
}
.contentCenter {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px; padding-bottom: 20px; font-weight: bolder;color:#303133;
  /deep/ .ant-checkbox-wrapper{
    color: #4C4C4C;
    font-weight: 400;
  }
  /deep/ .ant-checkbox-checked::after{
    border: 1px solid #489BD2;
    border-radius: 50%;
  }
  /deep/ .ant-checkbox-checked .ant-checkbox-inner{
    background-color: #489BD2;
    border-color: #489BD2;
  }
  /deep/ .ant-checkbox-wrapper:hover .ant-checkbox-inner, 
  /deep/ .ant-checkbox:hover .ant-checkbox-inner, 
  /deep/ .ant-checkbox-input:focus + .ant-checkbox-inner{
    border-color: #489BD2
  }
  /deep/ .ant-checkbox-inner{
    border-radius: 50%;
  }
}
.contentTip{
  background: #F3F4F4;
  font-weight: 400;
  font-size: 14px;
  color: #4C4C4C;
  padding: 16px 30px;
}
.contentBox{
  background-color: #FFFFFF; padding: 30px; width: 55%;min-width: 650px;margin: 0 auto;text-align: left;border-radius: 16px;
}
.contentLast {
  position: absolute;
  right: 0;font-weight: 500;
  font-size: 13px; color: rgb(150, 150, 150);
}
.footer{
  text-align: center;  
  .ant-btn-primary{
    background: #489BD2;
    border-color: #489BD2;
    border-radius: 4px;
    &:hover{
      background: #2f7caf;
      border-color: #2f7caf;
    }
  }
}
</style>